package com.lgit.model2.hw03;

public class FlowType extends PhoneCard implements FlowService {
    private int flow;       // 上网流量
    private double price;   // 每月资费

    public FlowType() {
    }

    public FlowType(String cType, String cNum, String userName, String userPass, double money, int callTime, int flow, int flow1, double price) {
        super(cType, cNum, userName, userPass, money, callTime, flow);
        this.flow = flow1;
        this.price = price;
    }

    @Override
    public int getFlow() {
        return flow;
    }

    @Override
    public void setFlow(int flow) {
        this.flow = flow;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }


    @Override
    public void flowService(int flow, PhoneCard pc) {
        System.out.println(pc.getUserName() + "本月使用了" + flow + "MB的流量");
    }
}
